<?php
/**
 * Created by PhpStorm.
 * User: edmmss
 * Date: 2019/1/9
 * Time: 14:21
 */

namespace app\modules\specification;


class NotSpecification implements SpecificationInterface
{
    private $_specifications = [];

    /**
     * NotSpecification constructor.
     * @param SpecificationInterface $specificationInterfaces
     */
    public function __construct(SpecificationInterface $specificationInterfaces)
    {
        $this->_specifications = $specificationInterfaces;
    }

    /**
     * className
     *
     * @date   2019/1/9
     * @author edmmss
     * @param Item $item
     * @return bool
     */
    public function isSatisfiedBy(Item $item): bool
    {
        // TODO: Implement isSatisfiedBy() method.
        return !$this->_specifications->isSatisfiedBy($item);
    }
}